Type Classes for Lightweight Substructural Types
نویسندگان
چکیده
Linear and substructural types are powerful tools, but adding them to standard functional programming languages often means introducing extra annotations and typing machinery. We propose a lightweight substructural type system design that recasts the structural rules of weakening and contraction as type classes; we demonstrate this design in a prototype language, Clamp. Clamp supports polymorphic substructural types as well as an expressive system of mutable references. At the same time, it adds little additional overhead to a standard Damas–Hindley–Milner type system enriched with type classes. We have established type safety for the core model and implemented a type checker with type inference in Haskell.
منابع مشابه
Practical Programming with Substructural Types
Substructural logics remove from classical logic rules for reordering, duplication, or dropping of assumptions. Because propositions in such a logic may no longer be freely copied or ignored, this suggests understanding propositions in substructural logics as representing resources rather than truth. For the programming language designer, substructural logics thus provide a framework for consid...
متن کاملDurability of Self-compacting Lightweight Aggregate Concretes (LWSCC) as Repair Overlays
For rehabilitation of damaged concrete structures, the durability of repair overlay is a very important issue. Self-compacting concretes (SCC) are known as a suitable repair overlay materials. In this study, the durability of different self-compacting lightweight aggregate concretes (LWSCC) and effect of lightweight aggregate type on them is investigated. 3 mix designs of LWSCC containing three...
متن کاملIntroducing a Lightweight Structural Model via Simulation of Vernacular “Pa Tu Pa” Arch
The knowledge of Iranian vernacular structures is based on geometry, and there is a possibility of recreating such structural patterns aimed at producing movable structures. The purpose of this research was to utilize the patterns of vernacular structures to provide a lightweight structural model. The questions raised included how to create various forms based on the structural history of any r...
متن کاملApplication of Phase Change Material (PCM) for Cooling Load Reduction in Lightweight and Heavyweight Buildings: Case Study of a High Cooling Load Region of Iran
The application of phase change material (PCM) for energy conservation purposes in the residential buildings was investigated in the present study. Two types of building in terms of materials as the lightweight building (LWB) and heavyweight building (HWB) located in a high cooling load demanding region of Iran were considered for the study. Different types of PCM from organic and inorganic cat...
متن کاملLightweight Linear Types in System F◦
We present System F◦, an extension of System F that uses kinds to distinguish between linear and unrestricted types, simplifying the use of linearity for general-purpose programming. We demonstrate through examples how System F◦ can elegantly express many useful protocols, and we prove that any protocol representable as a DFA can be encoded as an F◦ type. We supply mechanized proofs of System F...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014